Skip to content

Add Erdős Problem 596 (characterize graphs with finite-vs-countable Ramsey gap)#3783

Open
henrykmichalewski wants to merge 6 commits into
google-deepmind:mainfrom
henrykmichalewski:add-problem-596
Open

Add Erdős Problem 596 (characterize graphs with finite-vs-countable Ramsey gap)#3783
henrykmichalewski wants to merge 6 commits into
google-deepmind:mainfrom
henrykmichalewski:add-problem-596

Conversation

@henrykmichalewski
Copy link
Copy Markdown
Member

Formalises Erdős Problem 596: characterize the pairs of graphs $(G, H)$ exhibiting a finite-to-countable Ramsey gap.

Contents

  • Main open theorem: characterize the exceptional pairs $(G, H)$.
  • Definitions:
    • HasFiniteRamseyProperty
    • HasCountableRamseyEscape
    • IsErdosHajnalExceptional
  • Example: $(C_4, C_6)$ is exceptional via the Nešetřil-Rödl construction combined with Erdős-Hajnal.
  • Connection to Problem 595 for the pair $(K_4, K_3)$.

Assisted by Claude (Anthropic).

… Ramsey gap

Formalises Problem 596 asking which pairs (G, H) have finite Ramsey
number for G but arbitrarily large finite Ramsey numbers only when the
size grows, jumping to ℵ₀ in the countable case. Introduces predicates
HasFiniteRamseyProperty, HasCountableRamseyEscape, and
IsErdosHajnalExceptional, and records (C₄, C₆) as an example via the
Nešetřil-Rödl and Erdős-Hajnal results, with the link to Problem 595
for (K₄, K₃).

Reference: https://www.erdosproblems.com/596
Assisted by Claude (Anthropic).
@github-actions github-actions Bot added the erdos-problems Erdős Problems label Apr 16, 2026
@henrykmichalewski
Copy link
Copy Markdown
Member Author

Closes #815

Mirrors the Round C docstring pass from the private repo's
phase1-infrastructure branch. Each Lean file now carries the
canonical source statement and upstream URL inline so reviewers
can verify formalization against the source without navigating
away from the diff.
@@ -0,0 +1,229 @@
/-
Copyright 2025 The Formal Conjectures Authors.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Could you update the copyright year to 2026 for this new file?

**Status:** OPEN.
-/
@[category research open, AMS 5]
theorem erdos_596 : answer(sorry) ↔
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Problem 596 ask for which pairs (G₁, G₂) have the two properties? As written, this only asks for existence of at least one exceptional pair, which the later (C₄, C₆) variant already supplies. Could you make the main statement record the unknown characterization, perhaps by putting the class of exceptional pairs itself behind answer(sorry)?

@Paul-Lez Paul-Lez added the awaiting-author The author should answer a question or perform changes. Reply when done. label May 7, 2026
…ok] + copyright 2026

Per Paul-Lez review on PR google-deepmind#3783. Mechanical nits applied on top of an
upstream/main merge to pick up the new attribute infrastructure (google-deepmind#3900).
@henrykmichalewski
Copy link
Copy Markdown
Member Author

@Paul-Lez — applied the mechanical nits in 5991646, on top of an upstream/main merge: @[category undergraduate]@[category textbook] (and copyright 2026 where applicable). The substantive content comments on this PR (open characterization vs. existence/universal phrasing, etc.) are tracked separately and will be addressed in follow-up commits per PR.

…review)

The headline previously asked only for the existence of one exceptional
(G₁, G₂) pair, which is already supplied by the (C₄, C₆) variant. Per
Paul-Lez's review, the source asks for a characterization of all
exceptional pairs. The headline now asserts equivalence with a
conjectural predicate behind answer(sorry), and the existence statement
is demoted to a named variant.
@henrykmichalewski
Copy link
Copy Markdown
Member Author

Thanks for the review @PaulLez. Pushed 066b374 on add-problem-596: the headline now asserts characterization (pointwise iff with a conjectural predicate behind answer(sorry)), and the existence-of-one-pair statement is demoted to a variant erdos_596.variants.exists_exceptional.

@mo271 mo271 removed the awaiting-author The author should answer a question or perform changes. Reply when done. label May 10, 2026
Copy link
Copy Markdown
Collaborator

@mo271 mo271 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice formalization with good coverage of the known results! A few issues:

  1. Edge-colouring definitions miss disjointness (potential misformalization)

IsNEdgeColouring and IsCountableEdgeColouring define a colouring as H = ⨆ i, c i, which only requires the colour classes to cover H — the same edge can appear in multiple colour classes. A proper edge-colouring should partition the edges. This matters because:

For the Ramsey direction: quantifying over all covers (not just partitions) makes HasFiniteRamseyProperty stronger than intended.
For the escape direction: finding a cover (not a partition) is easier, making HasCountableRamseyEscape weaker than intended.
The combined effect means IsErdosHajnalExceptional may not be equivalent to the mathematical definition. Consider requiring at minimum (∀ i, c i ≤ H) ∧ H ≤ ⨆ i, c i, or ideally adding pairwise disjointness of the c i.

  1. ContainsCopy / IsFree duplicate Mathlib API

Mathlib already provides SimpleGraph.IsContained (notation G ⊑ H) and SimpleGraph.Free in Mathlib.Combinatorics.SimpleGraph.Copy with full API (transitivity, monotonicity, congruence, etc.). The custom ContainsCopy and IsFree are definitionally identical and should be replaced.

  1. Problem statement repeated 3×

The problem appears in the verbatim quote (line 23), the "Overview" section (lines 41–46), and the erdos_596 docstring (lines 126–148). Per project conventions, it should appear only once; variant-specific context should go in the respective variant docstrings.

  1. Universe mismatch

The main erdos_596 quantifies over Type but original_conjecture_is_false quantifies over Type*. These should be consistent.

…b IsContained/Free + dedupe statement (mo271 review)
@henrykmichalewski
Copy link
Copy Markdown
Member Author

Thanks @mo271 for the review. Pushed 4adc06f addressing all four points:

  1. Edge-colouring disjointness. IsNEdgeColouring and IsCountableEdgeColouring now require pairwise disjointness of colour classes (∀ i j, i ≠ j → Disjoint (c i) (c j)) in addition to the union being H. This fixes both the Ramsey direction (HasFiniteRamseyProperty was too strong) and the escape direction (HasCountableRamseyEscape was too weak).

  2. Use Mathlib IsContained / Free. Removed the local ContainsCopy and IsFree definitions; the file now uses SimpleGraph.IsContained (notation ) and SimpleGraph.Free from Mathlib.Combinatorics.SimpleGraph.Copy directly.

  3. Deduped problem statement. Trimmed the module docstring to title + *References:* block. The full statement appears only in the erdos_596 theorem docstring now (the duplicate ## Overview section has been removed).

  4. Universe consistency. Changed original_conjecture_is_false from Type* to Type to match the rest of the file.

Local lake build FormalConjectures.ErdosProblems.«596» succeeds.

@mo271
Copy link
Copy Markdown
Collaborator

mo271 commented May 14, 2026

Thanks. Already much better (and likely mathematically now not wrong anymore). More review comments:

  1. ForMathlib: Unify edge-colouring definitions

IsNEdgeColouring and IsCountableEdgeColouring are nearly identical — they differ only in the index type (Fin n vs ℕ). Please unify them into a single definition parameterized by the index type and place it in FormalConjecturesForMathlib/Combinatorics/SimpleGraph/EdgeColouring.lean:

def IsEdgeColouring {V ι : Type*} (H : SimpleGraph V) (c : ι → SimpleGraph V) : Prop :=
  H = ⨆ i, c i ∧ ∀ i j, i ≠ j → Disjoint (c i) (c j)

The two current definitions become
IsEdgeColouring H (c : Fin n → _) and IsEdgeColouring H (c : ℕ → _) respectively.

  1. ForMathlib: Ramsey definitions

HasFiniteRamseyProperty, HasCountableRamseyEscape, and IsErdosHajnalExceptional are general graph-theoretic concepts that would be reusable by Problem 595 and other Ramsey-type problems. Please move them to FormalConjecturesForMathlib/Combinatorics/SimpleGraph/Ramsey.lean (or similar).

  1. Don't repeat status in docstrings

Please remove the Status: OPEN / Status: SOLVED / Status: SOLVED (FALSE) lines from the docstrings (e.g., lines 96, 111, 124, 137, 150, 162, 176, 188). The status is already encoded in the @[category research open] / @[category research solved] attribute — repeating it in prose is redundant and creates a maintenance burden if the status changes.

  1. Docstring duplication

The $(C_4, C_6)$ example is described in 4 separate docstrings (erdos_596, C4_free_countable_escape, C4_C6_finite_ramsey, C4_C6_is_exceptional). The individual variant docstrings should briefly state what they prove without re-explaining the full context already given in the main docstring.

  1. No tests

Consider adding @[category test] sanity checks — e.g., that cycleGraph 4 ≠ ⊥, or basic properties of IsEdgeColouring.

@mo271 mo271 added the awaiting-author The author should answer a question or perform changes. Reply when done. label May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author The author should answer a question or perform changes. Reply when done. erdos-problems Erdős Problems

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants